﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Core.DBUtility;
using Microhard.Protal.Validators;

namespace Microhard.Protal.Models
{
    [FluentValidation.Attributes.Validator(typeof(CategoryModelValidator))]
    public class CategoryModel : BasePermissionModel
    {
        [Microhard.Core.DBUtility.ModelPKID]
        public Guid CategoryID { set; get; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { set; get; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { set; get; }
        /// <summary>
        /// 父分类ID
        /// </summary>
        public Guid? ParentCategoryID { set; get; }
        public string ParentCategoryName { set; get; }
        /// <summary>
        /// 所有子节点
        /// </summary>
        public List<CategoryModel> Subs { set; get; }

    }
}
